home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Comm / AmiTCP30b2.lha / src / amitcp / api / amiga_errlists.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-20  |  9.3 KB  |  235 lines

  1. RCS_ID_C="$Id: amiga_errlists.c,v 3.3 1994/01/20 02:18:00 jraja Exp $";
  2. /*
  3.  * Copyright (c) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
  4.  *                    Helsinki University of Technology, Finland.
  5.  *                    All rights reserved.
  6.  * 
  7.  * Created      : Sat Mar 20 02:04:29 1993 ppessi
  8.  * Last modified: Thu Jan 20 02:14:00 1994 jraja
  9.  *
  10.  * HISTORY
  11.  * $Log: amiga_errlists.c,v $
  12.  * Revision 3.3  1994/01/20  02:18:00  jraja
  13.  * Added #include <conf.h> as the first include.
  14.  *
  15.  * Revision 3.2  1994/01/14  14:10:21  too
  16.  * Added sana2errlist, ioerrlist and sana2wire-errlist
  17.  *
  18.  * Revision 3.1  1994/01/09  21:08:53  too
  19.  * Taken ppessi's netlib/errlst.c and added host error codes
  20.  *
  21.  */
  22.  
  23. #include <conf.h>
  24.  
  25. const char * const __sys_errlist[] = {
  26.     "Undefined error: 0",            /*  0 - ENOERROR */
  27.     "Operation not permitted",        /*  1 - EPERM */
  28.     "No such file or directory",        /*  2 - ENOENT */
  29.     "No such process",            /*  3 - ESRCH */
  30.     "Interrupted system call",        /*  4 - EINTR */
  31.     "Input/output error",            /*  5 - EIO */
  32.     "Device not configured",        /*  6 - ENXIO */
  33.     "Argument list too long",        /*  7 - E2BIG */
  34.     "Exec format error",            /*  8 - ENOEXEC */
  35.     "Bad file descriptor",            /*  9 - EBADF */
  36.     "No child processes",            /* 10 - ECHILD */
  37.     "Resource deadlock avoided",        /* 11 - EDEADLK */
  38.     "Cannot allocate memory",        /* 12 - ENOMEM */
  39.     "Permission denied",            /* 13 - EACCES */
  40.     "Bad address",                /* 14 - EFAULT */
  41.     "Block device required",        /* 15 - ENOTBLK */
  42.     "Device busy",                /* 16 - EBUSY */
  43.     "File exists",                /* 17 - EEXIST */
  44.     "Cross-device link",            /* 18 - EXDEV */
  45.     "Operation not supported by device",    /* 19 - ENODEV */
  46.     "Not a directory",            /* 20 - ENOTDIR */
  47.     "Is a directory",            /* 21 - EISDIR */
  48.     "Invalid argument",            /* 22 - EINVAL */
  49.     "Too many open files in system",    /* 23 - ENFILE */
  50.     "Too many open files",            /* 24 - EMFILE */
  51.     "Inappropriate ioctl for device",    /* 25 - ENOTTY */
  52.     "Text file busy",            /* 26 - ETXTBSY */
  53.     "File too large",            /* 27 - EFBIG */
  54.     "No space left on device",        /* 28 - ENOSPC */
  55.     "Illegal seek",                /* 29 - ESPIPE */
  56.     "Read-only file system",        /* 30 - EROFS */
  57.     "Too many links",            /* 31 - EMLINK */
  58.     "Broken pipe",                /* 32 - EPIPE */
  59.  
  60. /* math software */
  61.     "Numerical argument out of domain",    /* 33 - EDOM */
  62.     "Result too large",            /* 34 - ERANGE */
  63. /* non-blocking and interrupt i/o */
  64.     "Resource temporarily unavailable",    /* 35 - EAGAIN */
  65.                         /* 35 - EWOULDBLOCK */
  66.     "Operation now in progress",        /* 36 - EINPROGRESS */
  67.     "Operation already in progress",    /* 37 - EALREADY */
  68.  
  69. /* ipc/network software -- argument errors */
  70.     "Socket operation on non-socket",    /* 38 - ENOTSOCK */
  71.     "Destination address required",        /* 39 - EDESTADDRREQ */
  72.     "Message too long",            /* 40 - EMSGSIZE */
  73.     "Protocol wrong type for socket",    /* 41 - EPROTOTYPE */
  74.     "Protocol not available",        /* 42 - ENOPROTOOPT */
  75.     "Protocol not supported",        /* 43 - EPROTONOSUPPORT */
  76.     "Socket type not supported",        /* 44 - ESOCKTNOSUPPORT */
  77.     "Operation not supported",        /* 45 - EOPNOTSUPP */
  78.     "Protocol family not supported",    /* 46 - EPFNOSUPPORT */
  79.                         /* 47 - EAFNOSUPPORT */
  80.     "Address family not supported by protocol family",
  81.     "Address already in use",        /* 48 - EADDRINUSE */
  82.     "Can't assign requested address",    /* 49 - EADDRNOTAVAIL */
  83.  
  84. /* ipc/network software -- operational errors */
  85.     "Network is down",            /* 50 - ENETDOWN */
  86.     "Network is unreachable",        /* 51 - ENETUNREACH */
  87.     "Network dropped connection on reset",    /* 52 - ENETRESET */
  88.     "Software caused connection abort",    /* 53 - ECONNABORTED */
  89.     "Connection reset by peer",        /* 54 - ECONNRESET */
  90.     "No buffer space available",        /* 55 - ENOBUFS */
  91.     "Socket is already connected",        /* 56 - EISCONN */
  92.     "Socket is not connected",        /* 57 - ENOTCONN */
  93.     "Can't send after socket shutdown",    /* 58 - ESHUTDOWN */
  94.     "Too many references: can't splice",    /* 59 - ETOOMANYREFS */
  95.     "Connection timed out",            /* 60 - ETIMEDOUT */
  96.     "Connection refused",            /* 61 - ECONNREFUSED */
  97.  
  98.     "Too many levels of symbolic links",    /* 62 - ELOOP */
  99.     "File name too long",            /* 63 - ENAMETOOLONG */
  100.  
  101. /* should be rearranged */
  102.     "Host is down",                /* 64 - EHOSTDOWN */
  103.     "No route to host",            /* 65 - EHOSTUNREACH */
  104.     "Directory not empty",            /* 66 - ENOTEMPTY */
  105.  
  106. /* quotas & mush */
  107.     "Too many processes",            /* 67 - EPROCLIM */
  108.     "Too many users",            /* 68 - EUSERS */
  109.     "Disc quota exceeded",            /* 69 - EDQUOT */
  110.  
  111. /* Network File System */
  112.     "Stale NFS file handle",        /* 70 - ESTALE */
  113.     "Too many levels of remote in path",    /* 71 - EREMOTE */
  114.     "RPC struct is bad",            /* 72 - EBADRPC */
  115.     "RPC version wrong",            /* 73 - ERPCMISMATCH */
  116.     "RPC prog. not avail",            /* 74 - EPROGUNAVAIL */
  117.     "Program version wrong",        /* 75 - EPROGMISMATCH */
  118.     "Bad procedure for program",        /* 76 - EPROCUNAVAIL */
  119.  
  120.     "No locks available",            /* 77 - ENOLCK */
  121.     "Function not implemented",        /* 78 - ENOSYS */
  122.     "Inappropriate file type or format",    /* 79 - EFTYPE */
  123. };
  124.  
  125. const int __sys_nerr = { sizeof __sys_errlist / sizeof __sys_errlist[0] };
  126.  
  127. /****************************************************************************/
  128.  
  129. const char * const h_errlist[] = {
  130.     "Error 0",
  131.     "Unknown host",                /* 1 HOST_NOT_FOUND */
  132.     "Host name lookup failure",        /* 2 TRY_AGAIN */
  133.     "Unknown server error",            /* 3 NO_RECOVERY */
  134.     "No address associated with name",    /* 4 NO_ADDRESS */
  135. };
  136.  
  137. const int h_nerr = { sizeof h_errlist / sizeof h_errlist[0] };
  138.  
  139. /****************************************************************************/
  140.  
  141.  
  142. /*
  143.  * Copyright (c) 1982, 1985 Regents of the University of California.
  144.  * All rights reserved.
  145.  *
  146.  * Redistribution and use in source and binary forms, with or without
  147.  * modification, are permitted provided that the following conditions
  148.  * are met:
  149.  * 1. Redistributions of source code must retain the above copyright
  150.  *    notice, this list of conditions and the following disclaimer.
  151.  * 2. Redistributions in binary form must reproduce the above copyright
  152.  *    notice, this list of conditions and the following disclaimer in the
  153.  *    documentation and/or other materials provided with the distribution.
  154.  * 3. All advertising materials mentioning features or use of this software
  155.  *    must display the following acknowledgement:
  156.  *    This product includes software developed by the University of
  157.  *    California, Berkeley and its contributors.
  158.  * 4. Neither the name of the University nor the names of its contributors
  159.  *    may be used to endorse or promote products derived from this software
  160.  *    without specific prior written permission.
  161.  *
  162.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  163.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  164.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  165.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  166.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  167.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  168.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  169.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  170.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  171.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  172.  * SUCH DAMAGE.
  173.  */
  174.  
  175.  
  176. /* ----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<----8<---- */
  177.  
  178. const char * const sana2io_errlist[] = 
  179. {
  180.   "No error",                /* S2ERR_NO_ERROR */
  181.   "Resource allocation failure",    /* S2ERR_NO_RESOURCES */
  182.   "Unknown error", 
  183.   "Invalid argument",            /* S2ERR_BAD_ARGUMENT */
  184.   "Inappropriate state",        /* S2ERR_BAD_STATE */
  185.   "Invalid address",            /* S2ERR_BAD_ADDRESS */
  186.   "Requested packet too large",        /* S2ERR_MTU_EXCEEDED */
  187.   "Unknown error",
  188.   "Command is not supporter",        /* S2ERR_NOT_SUPPORTED */
  189.   "Driver software error detected",    /* S2ERR_SOFTWARE */
  190.   "Device driver is offline"        /* S2ERR_OUTOFSERVICE */
  191. };
  192.  
  193. const short sana2io_nerr = 
  194. { sizeof sana2io_errlist/sizeof sana2io_errlist[0] };
  195.  
  196. const char * const io_errlist[] = 
  197.   "Unknown error",            /* 0 */
  198.   "Device or unit failed to open",    /* IOERR_OPENFAIL */
  199.   "Request aborted",            /* IOERR_ABORTED */
  200.   "Command not supported by device",    /* IOERR_NOCMD */
  201.   "Invalid length",            /* IOERR_BADLENGTH */
  202.   "Invalid address",            /* IOERR_BADADDRESS */
  203.   "Requested unit is busy",        /* IOERR_UNITBUSY */
  204.   "Hardware self-test failed"        /* IOERR_SELFTEST */
  205. };
  206.  
  207. const short io_nerr = 
  208. { sizeof io_errlist/sizeof io_errlist[0] };
  209.  
  210. const char * const sana2wire_errlist[] = 
  211. {
  212.   "Generic error: 0",                   /* S2WERR_GENERIC_ERROR */
  213.   "Unit not configured",        /* S2WERR_NOT_CONFIGURED */
  214.   "Unit is currently online",        /* S2WERR_UNIT_ONLINE */
  215.   "Unit is currently offline",        /* S2WERR_UNIT_OFFLINE */
  216.   "Protocol already tracked",        /* S2WERR_ALREADY_TRACKED */
  217.   "Protocol not tracked",        /* S2WERR_NOT_TRACKED */
  218.   "Buff management function error",    /* S2WERR_BUFF_ERROR */
  219.   "Source address error",        /* S2WERR_SRC_ADDRESS */
  220.   "Destination address error",        /* S2WERR_DST_ADDRESS */
  221.   "Broadcast address error",        /* S2WERR_BAD_BROADCAST */
  222.   "Multicast address error",        /* S2WERR_BAD_MULTICAST */
  223.   "Multicast address list full",    /* S2WERR_MULTICAST_FULL */
  224.   "Unsupported event class",        /* S2WERR_BAD_EVENT */
  225.   "Statdata failed sanity check",    /* S2WERR_BAD_STATDATA */
  226.   "Unknown error",
  227.   "Attempt to config twice",        /* S2WERR_IS_CONFIGURED */
  228.   "Null pointer detected"        /* S2WERR_NULL_POINTER */
  229. };
  230.  
  231. const short sana2wire_nerr = 
  232. { sizeof sana2wire_errlist/sizeof sana2wire_errlist[0] };
  233.  
  234.